package com.huatai.datadevelop.utils;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Author zhangbenting
 * @Description TODO
 * @Date 2023/9/1 14:04
 * @Version 1.0
 */
@Data
@Component(value = "dataProperty")
public class DataProperty {
	public static String driverClassName;
	public static String url;
	public static String username;
	public static String password;
	public static String initialSize;
	public static String maxActive;
	public static String minIdle;

	@Value("${spring.datasource.druid.driver-class-name}")
	public void setDriverClassName(String driverClassName){
		DataProperty.driverClassName = driverClassName;
	}
	@Value("${spring.datasource.druid.url}")
	public void setUrl(String url){
		DataProperty.url = url;
	}
	@Value("${spring.datasource.druid.username}")
	public void setUsername(String username){
		DataProperty.username = username;
	}
	@Value("${spring.datasource.druid.password}")
	public void setPassword(String password){
		DataProperty.password = password;
	}
	@Value("${spring.datasource.druid.initial-size}")
	public void setInitialSize(String initialSize){
		DataProperty.initialSize = initialSize;
	}
	@Value("${spring.datasource.druid.max-active}")
	public void setMaxActive(String maxActive){
		DataProperty.maxActive = maxActive;
	}
	@Value("${spring.datasource.druid.min-idle}")
	public void setMinIdle(String minIdle){
		DataProperty.minIdle = minIdle;
	}

}
